package com.study.spring.ch05.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.study.spring.ch05.pojo.FormatterModel;


@Controller
@RequestMapping(value = "/ch05") // ①处理器的通用映射前缀
public class FormatterController {

	@RequestMapping(value = "/tf") // ②相对于①处的映射进行窄化
	/**
	 *http://localhost:8080/spring/ch05/tf?totalCount=12345&discount=0.25&sumMoney=123  
	 * @param arg0
	 * @param arg1
	 * @return
	 * @throws Exception
	 */
	public String testFormatter(@ModelAttribute("model") FormatterModel fm) {
		return "ch05/t";
	}

}
